﻿@using Sausage.Web.Models
@using Sausage.Web.DataModel
@using Sausage.Common
@using Telerik.Web.Mvc.UI
@model TreeNodeData
@{
    ViewBag.Title = "组织结构数据字典管理";
    Layout = "~/Views/Shared/MainLayout.cshtml";

    //用于保存分类信息
    List<string> categoryModels = new List<string>();

    //查询所有角色信息
     foreach (var item in Utility.OrganizationCategoryDictionary)
     {
         //转换为字符串
         categoryModels.Add(string.Format("{{ ID: {0}, Name: '{1}' }}", item.Key, item.Value));
     }
}
@section HeadCssLink
{
    <link href="@Url.Content("~/Content/Styles/ext-patch.css")" rel="stylesheet" type="text/css" />
}
@section HeadScriptLink
{
    <script src="@Url.Content("~/Scripts/ExtJS/locale/ext-lang-zh_CN.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/common.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/model.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Sausage/Organization/Index.js")" type="text/javascript"></script>
    <script type="text/javascript">
        //用于保存分类信息
        var master_categories =
                [
                    @Html.Raw(System.String.Join(",", categoryModels))
                ];

        //用于保存分类存储
        var store_master_categories = null;
    </script>
}
<h2>
    @ViewBag.Title
</h2>
<br />
<div id="data-grid" class="div-grid-box">
</div>
